package xtime

import (
	"time"
)

const DATE = `2006-01-02`
const DATE1 = `20060102`

const DATE_TIME = `2006-01-02 15:04:05`
const DATE_TIME_START_SECOND = `2006-01-02 15:04:00`
const DATE_TIME_ZERO_HOUR = `2006-01-02 00:00:00`
const DATE_TIME_FORMAT = `20060102150405`

func ParseInLocal(layout, value string) (time.Time, error) {
	loc, err := time.LoadLocation("Local")
	if err != nil {
		return time.Time{}, err
	}

	return time.ParseInLocation(layout, value, loc)
}
